package com.mareas.web.model;

// Generated 20/11/2011 19:14:33 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Pago generated by hbm2java
 */
@Entity
@Table(name = "pago", catalog = "mareasdb")
public class Pago implements java.io.Serializable {

	private PagoId id;
	private Operacion operacion;
	private Date operacionPagoFecha;
	private Date operacionPagoMonto;

	public Pago() {
	}

	public Pago(PagoId id, Operacion operacion, Date operacionPagoFecha,
			Date operacionPagoMonto) {
		this.id = id;
		this.operacion = operacion;
		this.operacionPagoFecha = operacionPagoFecha;
		this.operacionPagoMonto = operacionPagoMonto;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "operacionId", column = @Column(name = "Operacion_ID", nullable = false)),
			@AttributeOverride(name = "pagoId", column = @Column(name = "Pago_ID", nullable = false)) })
	public PagoId getId() {
		return this.id;
	}

	public void setId(PagoId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Operacion_ID", nullable = false, insertable = false, updatable = false)
	public Operacion getOperacion() {
		return this.operacion;
	}

	public void setOperacion(Operacion operacion) {
		this.operacion = operacion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "Operacion_Pago_Fecha", nullable = false, length = 10)
	public Date getOperacionPagoFecha() {
		return this.operacionPagoFecha;
	}

	public void setOperacionPagoFecha(Date operacionPagoFecha) {
		this.operacionPagoFecha = operacionPagoFecha;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "Operacion_Pago_Monto", nullable = false, length = 10)
	public Date getOperacionPagoMonto() {
		return this.operacionPagoMonto;
	}

	public void setOperacionPagoMonto(Date operacionPagoMonto) {
		this.operacionPagoMonto = operacionPagoMonto;
	}

}
